package cz.muni.fi.pa165.rentalofconstructionmachinery.dto;

import cz.muni.fi.pa165.rentalofconstructionmachinery.CustomerType;

/**
 *
 * @author Adam Zmrzlý
 */
public class CustomerDTO {
    private Long id;
    private String name;
    private CustomerType type;
    
    private String username;
    private String password;
    private Integer accessLevel;

    public CustomerDTO(Long id, String name, CustomerType type, String username,
            String password, Integer accessLevel) {
        this.id = id;
        this.name = name;
        this.type = type;
        this.username = username;
        this.password = password;
        this.accessLevel = accessLevel;
    }

    public CustomerDTO() {
    }
    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public CustomerType getType() {
        return type;
    }

    public void setType(CustomerType type) {
        this.type = type;
    }

    public Integer getAccessLevel() {
        return accessLevel;
    }

    public void setAccessLevel(Integer accessLevel) {
        this.accessLevel = accessLevel;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    @Override
    public int hashCode() {
        int hash = 7;
        hash = 79 * hash + (this.id != null ? this.id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final CustomerDTO other = (CustomerDTO) obj;
        if (this.id != other.id && (this.id == null || !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Customer: id=" + id + ", name=" + name + ", type=" + type;
    }
}
